﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using thangtranus.Core;

namespace Micronet.OpenWeb.OpenWeb
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ShowCacheStuff();
            Label1.Text = Guid.Empty.ToString();
        }
        private void ShowCacheStuff()
        {
            if (Cache["test"] == null)
            {
                CacheHelper.Group("TestGroup").Insert("test", DateTime.Now);
            }
            Response.Write(Cache["test"]);
            Response.Write("<hr>");
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            CacheHelper.Group("TestGroup").Clear();
            ShowCacheStuff();
        }
    }
}